package com.zjw.zy.datasource.converter;

import androidx.annotation.Nullable;
import androidx.room.TypeConverter;

import com.zjw.zy.utils.TimeUtils;

import java.util.Date;

/**
 * @author ：zhong.jw
 * @date ：Created in 2022/9/30 8:59
 */
public class DataBaseConverter {


    @TypeConverter
    public String dateToString(@Nullable Date date){
        if (date == null){
            return "";
        }

        return TimeUtils.formatDate(date);
    }
}
